﻿<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>@ViewBag.Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">    
    <!-- Le styles -->
    <link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet">
    <link href="@Url.Content("~/Content/bootstrap-responsive.min.css")" rel="stylesheet">
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet">
    
    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    @*<!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="images/favicon.ico">
    <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">*@
    <script src="@Url.Content("~/Scripts/jquery-2.2.1.min.js")"></script>
    <script src="@Url.Content("~/Scripts/bootstrap.min.js")"></script>
    <script src="@Url.Content("~/Scripts/clipboard-1.5.9.min.js")"></script>
    @RenderSection("head", required: false)
</head>
<body>

    <div class="navbar navbar-fixed-top navbar-inverse">
        <div class="container">
          <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="@Url.Content("~/")">Kudu Dashboard</a>
          </div>

          <div id="navbar" class="collapse navbar-collapse">
              <ul class="nav navbar-nav">
                  <li>@Html.RouteLink("Create Application", "ApplicationCreate")</li>
              </ul>
              <ul class="nav navbar-nav navbar-right">
                  <li>@Html.ActionLink("Admin", "index", "admin")</li>
              </ul>
          </div>
        </div>
    </div>

    <div class="container">
      @{ bool showWarning = ViewBag.showAdmingWarning != null && ViewBag.showAdmingWarning; }

      @if (showWarning) 
      {
          <p class="alert alert-error">You are running kudu against a local kudu service and are not an Administrator. Re-run this process as Administrator in order to continue.</p>
      }
      else if (!String.IsNullOrEmpty(ViewBag.slug))
      { 
        <div class="subnav subnav-fixed">
            <ul class="nav nav-pills">
              <li @if (ViewBag.tab == "settings")
                  {<text>class="active"</text> }>@Html.RouteLink("Settings", "ApplicationDetails", new { slug = ViewBag.slug }, null)</li>
              <li @if (ViewBag.tab == "deployments")
                  {<text>class="active"</text> }>@Html.RouteLink("Deployments", "Deployments", new { slug = ViewBag.slug }, null)</li>
              <li @if (ViewBag.tab == "configuration")
                  {<text>class="active"</text> }>@Html.RouteLink("Configuration", "Configuration", new { slug = ViewBag.slug }, null)</li>
            </ul>
        </div>

        <div class="page-header">
          <h1>@ViewBag.appName</h1>
        </div>
      }
    
      @if (!showWarning)
      { 
          @RenderBody()
      }
      else 
      {
          RenderBody();
      }

    </div> <!-- /container -->

    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="@Url.Content("~/Scripts/Site.js")"></script>
    @RenderSection("scripts", required: false)
  </body>
</html>

